﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Complaint.Controllers.AccountFormViewModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Account Registration</title>
    <meta name="description" content="icomplain account registration" />
    <meta name="keywords" content="account,new,register,registration" />
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Create a New Account</h2>
    <% using (Html.BeginForm())
       { %>
    <%= Html.ValidationSummary(true) %>
    <p>
        Note: * marked are required fields.</p>
    <fieldset>
        <legend>Account Information</legend>
        <p>
            <label for="Title">
                Title:</label>
            <em>&nbsp;</em><%= Html.DropDownList("Title", Model.Titles)%>
        </p>
        <p>
            <label for="FirstName">
                First Name:</label>
            <em>*</em><%= Html.TextBox("FirstName", Model.Instance.FirstName, new { maxlength = 50 })%>
            <%= Html.ValidationMessage("FirstName")%>
            <span>Will not be displayed publicly.</span>
        </p>
        <p>
            <label for="LastName">
                Last Name:</label>
            <em>*</em><%= Html.TextBox("LastName", Model.Instance.LastName, new { maxlength = 50 })%>
            <%= Html.ValidationMessage("LastName")%>
            <span>Will not be displayed publicly.</span>
        </p>
        <p>
            <label for="DisplayName">
                Username:</label>
            <em>*</em><%= Html.TextBox("DisplayName", Model.Instance.DisplayName, new { maxlength = 50 })%>
            <%= Html.ValidationMessage("DisplayName")%>
            <span>Will be used for displaying purpose</span>
        </p>
        <p>
            <label for="Email">
                Email:</label>
            <em>*</em><%= Html.TextBox("Email", Model.Instance.Email, new { maxlength = 100 })%>
            <%= Html.ValidationMessage("Email")%>
            <span>Will be used for logon and primary contact purpose only.</span>
        </p>
        <p>
            <label for="Password">
                Password:</label>
            <em>*</em><%= Html.Password("Password", Model.Instance.Password, new { maxlength = 20 })%>
            <%= Html.ValidationMessage("Password")%>
            <span>Passwords should be
                <%=Html.Encode(Complaint.Models.Dtos.User.MinRequiredPasswordLength)%>
                characters at minimum.</span>
        </p>
        <p>
            <label for="confirmPassword">
                Confirm Password:</label>
            <em>*</em><%= Html.Password("confirmPassword", null, new { maxlength = 20 })%>
            <%= Html.ValidationMessage("confirmPassword")%>
        </p>
        <p>
            <label for="passwordQuestionId">
                Password Question:</label>
            <em>*</em><%= Html.DropDownList("passwordQuestionId", Model.PickList)%>
            <%= Html.ValidationMessage("passwordQuestionId", "Please select")%>
        </p>
        <p>
            <label for="PasswordAnswer">
                Password Answer:</label>
            <em>*</em><%= Html.TextBox("PasswordAnswer", Model.Instance.PasswordAnswer, new { maxlength = 200 })%>
            <%= Html.ValidationMessage("PasswordAnswer")%>
        </p>
        <p>
            <button id="save" class="formbutton">
                Register</button>
        </p>
    </fieldset>
    <% } %>
</asp:Content>
